<!--Created by yangzhiqiang -->
<template>
    <div class="show_images">
        <img src="../../../static/image/u629.jpg" />
        <div class="row">
            <div class="col-lg-12">
                <h4 class="page-header">图片（{{imgList.length}}）</h4>
            </div>
        </div>
        <div>
            <img v-for="item in imgList" :src="item.imgUrl" />
        </div>
    </div>
</template>

<script type="text/ecmascript-6">
    const probeApiV100 = '/probe/api/v100/';
    const dataImagesList = probeApiV100 + 'data/images/list';
    //import Mock from 'mockjs'
    export default {
        name: 'show_device',
        data() {
            return {
                //todo 这里是data区域
                currentPage: 4,
                tableData: [],
                multipleSelection: [],
                dataDeviceList:[],
                tableDatalistTotal: 0,
                imgList:[]
            }
        },
        components: {
            //TODO 添加子组件
        },
        computed: {
            //TODO 计算区
        },
        methods: {
            //TODO 方法区
            handleSizeChange(val) {
                console.log(`每页 ${val} 条`);
            },
            handleCurrentChange(val) {
                console.log(`当前页: ${val}`);
            },
            toggleSelection(rows) {
                if (rows) {
                    rows.forEach(row => {
                        this.$refs.multipleTable.toggleRowSelection(row);
                    });
                } else {
                    this.$refs.multipleTable.clearSelection();
                }
            },
            handleSelectionChange(val) {
                this.multipleSelection = val;
            },
            handleClick() {
                console.log(1);
            },
            deleteRow(index, rows) {

                rows.splice(index, 1);
                if (rows) {
                    rows.forEach(row => {
                        this.$refs.multipleTable.toggleRowSelection(row);
                    });
                } else {
                    this.$refs.multipleTable.clearSelection();
                }
            },
            fetchData () {
                this.$axios.post(dataImagesList, {
                        page:2,
                        rows:10,
                        imsi:1,
                        imei:2,
                        manufacture:3,
                        udid:4
                }).then(res=>{
                    //console.log(res.data)
                    //console.log(JSON.parse(res.data))
                    this.imgList = res.data.data.imagesList;
                    //console.log(this.imgList)
                }).catch(err => { console.log(err) })
            }
        },
        created () {
            this.fetchData();
        },
        mounted: function () {
            //TODO 函数执行区域

        }
    }
</script>
<style lang="scss" scoped>
    .paging_delet_relative{
        position: relative;
        width: 100%;
        margin-top: 20px;
    }
    .block{
        position: absolute;
        top:0;
        right:0;
    }
</style>
